<?php

return [
    [
        'name' => 'platform',
        'title' => '启用平台',
        'type' => 'radio',
        'content' => [
            '不启用',
            'dingtalk' => '钉钉',
            'wechatwork' => '企业微信',
            'feishu' => '飞书',
        ],
        'value' => 'wechatwork',
        'rule' => 'required',
        'msg' => '',
        'tip' => '仅能启用一个第三方平台',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'bindaccount',
        'title' => '账号绑定',
        'type' => 'radio',
        'content' => [
            1 => '绑定',
            0 => '不绑定',
        ],
        'value' => '0',
        'rule' => 'required',
        'msg' => '',
        'tip' => '是否在第三方平台登录成功后绑定本地账号',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'registerverify',
        'title' => '注册前验证',
        'type' => 'radio',
        'content' => [
            1 => '验证',
            0 => '不验证',
        ],
        'value' => '1',
        'rule' => 'required',
        'msg' => '',
        'tip' => '验证即禁止非组织内成员注册',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'dingtalk',
        'title' => '钉钉',
        'type' => 'array',
        'content' => [
            'appid_qr' => '',
            'appsecret_qr' => '',
            'appkey' => '',
            'appsecret' => '',
        ],
        'value' => [
            'appid_qr' => '',
            'appsecret_qr' => '',
            'appkey' => '',
            'appsecret' => '',
        ],
        'rule' => 'required',
        'msg' => '',
        'tip' => '',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'wechatwork',
        'title' => '企业微信',
        'type' => 'array',
        'content' => [
            'corpid' => '',
            'agentid' => '',
            'corpsecret' => '',
            'messagetoken' => '',
            'messageaeskey' => '',
        ],
        'value' => [
            'corpid' => 'ww04eef713b03e46a2',
            'agentid' => '1000107',
            'corpsecret' => 'YAMufQmywXTz1fEZkO70Yy0dLRRTYqDWdPxww3HM55k',
            'messagetoken' => 'tEoEQyB1Ekg1Rx8jlHUsncEwBsnzn56',
            'messageaeskey' => '8K8sA2qCcD6pxrvfMkKTdS7HHkBYUsfs2k93uB4zmoW',
        ],
        'rule' => 'required',
        'msg' => '',
        'tip' => '',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'feishu',
        'title' => '飞书',
        'type' => 'array',
        'content' => [
            'app_id' => '',
            'app_secret' => '',
        ],
        'value' => [
            'app_id' => '',
            'app_secret' => '',
        ],
        'rule' => 'required',
        'msg' => '',
        'tip' => '',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'rewrite',
        'title' => '伪静态',
        'type' => 'array',
        'content' => [],
        'value' => [
            'index/index' => '/thirdwork$',
            'index/connect' => '/thirdwork/connect/[:platform]',
            'index/callback' => '/thirdwork/callback/[:platform]',
            'index/bind' => '/thirdwork/bind/[:platform]',
            'index/unbind' => '/thirdwork/unbind/[:platform]',
        ],
        'rule' => 'required',
        'msg' => '',
        'tip' => '',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => '__tips__',
        'title' => '各平台网址',
        'type' => 'string',
        'content' => [],
        'value' => "\n"
            .'            1.钉钉开放平台：<a href="https://open-dev.dingtalk.com" target=_blank>https://open-dev.dingtalk.com</a> <br/>'."\n"
            .'            2.企业微信后台：<a href="https://work.weixin.qq.com" target=_blank>https://work.weixin.qq.com</a> <br/>'."\n"
            .'            3.飞书开放平台： <a href="https://open.feishu.cn" target=_blank>https://open.feishu.cn</a> <br/>'."\n"
            .'        ',
        'rule' => '',
        'msg' => '',
        'tip' => '',
        'ok' => '',
        'extend' => '',
    ],
];
